<?php
class apppushControl extends skymvc{
	
	public function __construct(){
		parent::__construct();	
		
	}
	
	public function onDefault(){
		
		
	}
	
	public function onSend(){
		
		
	}
	
	public function onSave(){
		$data=M("apppush")->postData();
		$row=M("apppush")->selectRow(array(
			"where"=>" token='".$data['token']."' AND clientid='".$data['clientid']."' AND appid='".$data['appid']."' AND appkey='".$data['appkey']."' "
		));
		$data['dateline']=time();
		if(!$row && $data['token'] && $data['clientid']){
			M("apppush")->insert($data);
		}
		$this->goAll("success");
	}
	
}


?>